<div id="File-status"></div>
<div class="header">
<p>
Next: [[cvs: Bringing a file up to date#Bringing a file up to date|Updating a file]], Up: [[cvs: Multiple developers#Multiple developers|Multiple developers]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="File-status-1"></div>
=== File status ===
<div id="index-File-status"></div>
<div id="index-Status-of-a-file"></div>

Based on what operations you have performed on a
checked out file, and what operations others have
performed to that file in the repository, one can
classify a file in a number of states.  The states, as
reported by the <code>status</code> command, are:

<div id="index-Up_002dto_002ddate"></div>
;Up-to-date
: The file is identical with the latest revision in the repository for the branch in use.

;Locally Modified
<div id="index-Locally-Modified"></div>
: You have edited the file, and not yet committed your changes.

;Locally Added
<div id="index-Locally-Added"></div>
: You have added the file with <code>add</code>, and not yet committed your changes.

;Locally Removed
<div id="index-Locally-Removed"></div>
: You have removed the file with <code>remove</code>, and not yet committed your changes.

;Needs Checkout
<div id="index-Needs-Checkout"></div>
: Someone else has committed a newer revision to the repository.  The name is slightly misleading; you will ordinarily use <code>update</code> rather than <code>checkout</code> to get that newer revision.

;Needs Patch
<div id="index-Needs-Patch"></div>
: Like Needs Checkout, but the <small>CVS</small> server will send a patch rather than the entire file.  Sending a patch or sending an entire file accomplishes the same thing.

;Needs Merge
<div id="index-Needs-Merge"></div>
: Someone else has committed a newer revision to the repository, and you have also made modifications to the file.

;Unresolved Conflict
<div id="index-Unresolved-Conflict"></div>
: A file with the same name as this new file has been added to the repository from a second workspace.  This file will need to be moved out of the way to allow an <code>update</code> to complete.

;File had conflicts on merge
<div id="index-File-had-conflicts-on-merge"></div>
: This is like Locally Modified, except that a previous <code>update</code> command gave a conflict.  If you have not already done so, you need to resolve the conflict as described in [[cvs: Conflicts example#Conflicts example|Conflicts example]].

;Unknown
<div id="index-Unknown"></div>
: <small>CVS</small> doesn&rsquo;t know anything about this file.  For example, you have created a new file and have not run <code>add</code>.


To help clarify the file status, <code>status</code> also
reports the <code>Working revision</code> which is the
revision that the file in the working directory derives
from, and the <code>Repository revision</code> which is the
latest revision in the repository for the branch in
use.

The options to <code>status</code> are listed in
[[cvs: Quick reference to CVS commands#Quick reference to CVS commands|Invoking CVS]].  For information on its <code>Sticky tag</code>
and <code>Sticky date</code> output, see [[cvs: Sticky tags#Sticky tags|Sticky tags]].
For information on its <code>Sticky options</code> output,
see the &lsquo;<code>-k</code>&rsquo; option in [[cvs: update options#update options|update options]].

You can think of the <code>status</code> and <code>update</code>
commands as somewhat complementary.  You use
<code>update</code> to bring your files up to date, and you
can use <code>status</code> to give you some idea of what an
<code>update</code> would do (of course, the state of the
repository might change before you actually run
<code>update</code>).  In fact, if you want a command to
display file status in a more brief format than is
displayed by the <code>status</code> command, you can invoke

<div id="index-update_002c-to-display-file-status"></div>
<div class="example" style="margin-left: 3.2em">
 $ cvs -n -q update
</div>

The &lsquo;<code>-n</code>&rsquo; option means to not actually do the
update, but merely to display statuses; the &lsquo;<code>-q</code>&rsquo;
option avoids printing the name of each directory.  For
more information on the <code>update</code> command, and
these options, see [[cvs: Quick reference to CVS commands#Quick reference to CVS commands|Invoking CVS]].


----

<div class="header">
<p>
Next: [[cvs: Bringing a file up to date#Bringing a file up to date|Updating a file]], Up: [[cvs: Multiple developers#Multiple developers|Multiple developers]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
